package com.xq.sboot.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能说明:Hello Controller.
 * <p>创建时间:2018-12-09 10:54</p>
 * @author <a href="https://gitee.com/gkq/microservice">郭凯强</a>
 * @since 1.0.0
 */
@RestController
public class HelloController {
    private final Logger logger = LoggerFactory.getLogger(HelloController.class);
    private final Marker marker = MarkerFactory.getMarker("HelloController");
    /**
     * 传入自定义配置
     */
    @Value("${file.server.url}")
    private String fileServerUrl = null;

    @GetMapping("/hello")
    public String hello() {
        logger.debug(marker, "自定义配置file.server.url={}", fileServerUrl);
        return "Hello World! Welcome to visit xq.com!";
    }

}
